﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Module.CanJuSheJi.Common
{
    /// <summary>
    /// 订阅消息内容的基础类
    /// </summary>
    public class MessageBass
    {
        public string MessageEventName { get; set; } // 消息类别：系统类、服务类、模块类或棋谱类
        public string MessageName { get; set; } // 消息名称
        public string SenderFrom { get; set; } // 消息发送者
        public string Content { get; set; } // 消息说明
        public string TimeStamp { get; set; } // 消息时间戳
        private string _moduleName;
        public string ModuleName { get { return _moduleName ?? ""; } set { _moduleName = value; } } // 消息发出者所在的模块
        public void SetTimeStamp()
        {
            TimeStamp = DateTime.Now.ToString("yyyy/MM/d HH:MM:ss:ffffff");
            MessageEventName = this.GetType().Name;
        }
       
    }
}
